<div class="bjui-pageHeader" style="background-color:#fefefe; border-bottom:none;">
    <form data-toggle="ajaxsearch" data-options="{searchDatagrid:$.CurrentNavtab.find('#one-product-supplier-list')}">
        <fieldset>
            <legend style="font-weight:normal;">页头搜索：</legend>
            <div style="margin:0; padding:1px 5px 5px;">
                <span>供应商名称：</span>
                <input type="hidden" name="supplier_id" >
                <input type="text" name="supplier_name" id="supplier_name" data-toggle="findgrid" data-options="{
                    include: 'supplier_id:id,supplier_name',
                    dialogOptions: {title:'查找供应商'},
                    gridOptions: {
                        local: 'local',
                        dataUrl: '/admin/supplier/list',
                        columns: [
                            {name:'supplier_name', label:'供应商名称', width:100},
                        ]
                    }
                }" disabled>

                <div class="btn-group">
                    <button type="submit" class="btn-green" data-icon="search">开始搜索！</button>
                    <button type="reset" class="btn-orange" data-icon="times">重置</button>
                </div>
            </div>
        </fieldset>
    </form>
</div>
<div class="bjui-pageContent">
    <table class="table table-bordered" id="one-product-supplier-list" data-toggle="datagrid" data-options="{
            height: '100%',
            gridTitle : '材料供应商列表',
            editMode: {dialog:{id:'product-supplier-custom-save',fresh:true, url:'/admin/pro/supplier-custom-save',data:{product_id:{{$productId}}}, type:'get', title:'供应商材料关联', width:1000, height:600}},
            {{--editMode: 'dialog',--}}
              local: 'remote',
            showToolbar: true,
            toolbarItem:'add',
            dataUrl: '/admin/pro/supplier-list?product_id={{$productId}}',
            editUrl: '/admin/pro/supplier-save',
            delUrl: '/admin/pro/supplier-del',
            delPK: 'id',
            linenumberAll: true,
            sortAll: false,
            contextMenuH: true,
            contextMenuB: true,
            showCheckboxcol: true,
            inlineEditMult: true,
            paging: {showPagenum:10, selectPageSize:'20,50,100', pageCurrent:1, pageSize:20},
            {{--showEditbtnscol: '操作',--}}
            customEditbtns: {width:200,position:'replace'},
            fullGrid: true,
            {{--fieldSortable: false,--}}
              sortAll:true,
            filterThead: false,
            columnMenu: false,
            exportOption:{type:'file', options:{url:'admin/supplier/export', type:'get', data: {_token : '{{ csrf_token() }}'}}}
        }">
        <thead>
        <tr>
            <th data-options="{name:'supplier_name',align:'center',width:100}">供应商名称</th>
            <th data-options="{name:'product_name',align:'center',width:100}">材料名</th>
            <th data-options="{name:'number',align:'center',width:100}">数量</th>
        </tr>
        </thead>
    </table>
</div>
